.class public Lcom/noshufou/android/su/widget/ChangeLog;
.super Ljava/lang/Object;
.source "ChangeLog.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/noshufou/android/su/widget/ChangeLog$Listmode;
    }
.end annotation


# static fields
.field private static final EOCL:I = -0x1

.field private static final TAG:Ljava/lang/String; = "ChangeLog"

.field private static final VERSION_KEY:Ljava/lang/String; = "pref_version_key"


# instance fields
.field private final context:Landroid/content/Context;

.field private lastVersion:I

.field private listMode:Lcom/noshufou/android/su/widget/ChangeLog$Listmode;

.field private sb:Ljava/lang/StringBuffer;

.field private thisVersion:I


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 7
    .parameter "context"

    .prologue
    const/4 v6, 0x0

    .line 43
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 178
    sget-object v3, Lcom/noshufou/android/su/widget/ChangeLog$Listmode;->NONE:Lcom/noshufou/android/su/widget/ChangeLog$Listmode;

    iput-object v3, p0, Lcom/noshufou/android/su/widget/ChangeLog;->listMode:Lcom/noshufou/android/su/widget/ChangeLog$Listmode;

    .line 179
    const/4 v3, 0x0

    iput-object v3, p0, Lcom/noshufou/android/su/widget/ChangeLog;->sb:Ljava/lang/StringBuffer;

    .line 44
    iput-object p1, p0, Lcom/noshufou/android/su/widget/ChangeLog;->context:Landroid/content/Context;

    .line 47
    invoke-static {p1}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v2

    .line 51
    .local v2, sp:Landroid/content/SharedPreferences;
    :try_start_0
    const-string v3, "pref_version_key"

    const/4 v4, 0x0

    invoke-interface {v2, v3, v4}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I

    move-result v3

    iput v3, p0, Lcom/noshufou/android/su/widget/ChangeLog;->lastVersion:I
    :try_end_0
    .catch Ljava/lang/ClassCastException; {:try_start_0 .. :try_end_0} :catch_0

    .line 56
    :goto_0
    const-string v3, "ChangeLog"

    new-instance v4, Ljava/lang/StringBuilder;

    const-string v5, "lastVersion: "

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget v5, p0, Lcom/noshufou/android/su/widget/ChangeLog;->lastVersion:I

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-static {v3, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 58
    :try_start_1
    invoke-virtual {p1}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v3

    .line 59
    invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v4

    const/4 v5, 0x0

    .line 58
    invoke-virtual {v3, v4, v5}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;

    move-result-object v3

    .line 59
    iget v3, v3, Landroid/content/pm/PackageInfo;->versionCode:I

    .line 58
    iput v3, p0, Lcom/noshufou/android/su/widget/ChangeLog;->thisVersion:I
    :try_end_1
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_1 .. :try_end_1} :catch_1

    .line 65
    :goto_1
    const-string v3, "ChangeLog"

    new-instance v4, Ljava/lang/StringBuilder;

    const-string v5, "appVersion: "

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget v5, p0, Lcom/noshufou/android/su/widget/ChangeLog;->thisVersion:I

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-static {v3, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 68
    invoke-interface {v2}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v1

    .line 69
    .local v1, editor:Landroid/content/SharedPreferences$Editor;
    const-string v3, "pref_version_key"

    iget v4, p0, Lcom/noshufou/android/su/widget/ChangeLog;->thisVersion:I

    invoke-interface {v1, v3, v4}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;

    .line 70
    invoke-interface {v1}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 71
    return-void

    .line 52
    .end local v1           #editor:Landroid/content/SharedPreferences$Editor;
    :catch_0
    move-exception v0

    .line 54
    .local v0, e:Ljava/lang/ClassCastException;
    iput v6, p0, Lcom/noshufou/android/su/widget/ChangeLog;->lastVersion:I

    goto :goto_0

    .line 60
    .end local v0           #e:Ljava/lang/ClassCastException;
    :catch_1
    move-exception v0

    .line 61
    .local v0, e:Landroid/content/pm/PackageManager$NameNotFoundException;
    iput v6, p0, Lcom/noshufou/android/su/widget/ChangeLog;->thisVersion:I

    .line 62
    const-string v3, "ChangeLog"

    const-string v4, "could not get version name from manifest!"

    invoke-static {v3, v4}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 63
    invoke-virtual {v0}, Landroid/content/pm/PackageManager$NameNotFoundException;->printStackTrace()V

    goto :goto_1
.end method

.method private closeList()V
    .locals 2

    .prologue
    .line 259
    iget-object v0, p0, Lcom/noshufou/android/su/widget/ChangeLog;->listMode:Lcom/noshufou/android/su/widget/ChangeLog$Listmode;

    sget-object v1, Lcom/noshufou/android/su/widget/ChangeLog$Listmode;->ORDERED:Lcom/noshufou/android/su/widget/ChangeLog$Listmode;

    if-ne v0, v1, :cond_1

    .line 260
    iget-object v0, p0, Lcom/noshufou/android/su/widget/ChangeLog;->sb:Ljava/lang/StringBuffer;

    const-string v1, "</ol></div>\n"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 264
    :cond_0
    :goto_0
    sget-object v0, Lcom/noshufou/android/su/widget/ChangeLog$Listmode;->NONE:Lcom/noshufou/android/su/widget/ChangeLog$Listmode;

    iput-object v0, p0, Lcom/noshufou/android/su/widget/ChangeLog;->listMode:Lcom/noshufou/android/su/widget/ChangeLog$Listmode;

    .line 265
    return-void

    .line 261
    :cond_1
    iget-object v0, p0, Lcom/noshufou/android/su/widget/ChangeLog;->listMode:Lcom/noshufou/android/su/widget/ChangeLog$Listmode;

    sget-object v1, Lcom/noshufou/android/su/widget/ChangeLog$Listmode;->UNORDERED:Lcom/noshufou/android/su/widget/ChangeLog$Listmode;

    if-ne v0, v1, :cond_0

    .line 262
    iget-object v0, p0, Lcom/noshufou/android/su/widget/ChangeLog;->sb:Ljava/lang/StringBuffer;

    const-string v1, "</ul></div>\n"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    goto :goto_0
.end method

.method private getDialog(Z)Landroid/app/AlertDialog;
    .locals 5
    .parameter "full"

    .prologue
    .line 135
    new-instance v1, Landroid/webkit/WebView;

    iget-object v2, p0, Lcom/noshufou/android/su/widget/ChangeLog;->context:Landroid/content/Context;

    invoke-direct {v1, v2}, Landroid/webkit/WebView;-><init>(Landroid/content/Context;)V

    .line 136
    .local v1, wv:Landroid/webkit/WebView;
    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Landroid/webkit/WebView;->setBackgroundColor(I)V

    .line 137
    invoke-direct {p0, p1}, Lcom/noshufou/android/su/widget/ChangeLog;->getLog(Z)Ljava/lang/String;

    move-result-object v2

    const-string v3, "text/html"

    const-string v4, "UTF-8"

    invoke-virtual {v1, v2, v3, v4}, Landroid/webkit/WebView;->loadData(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 139
    new-instance v0, Landroid/app/AlertDialog$Builder;

    iget-object v2, p0, Lcom/noshufou/android/su/widget/ChangeLog;->context:Landroid/content/Context;

    invoke-direct {v0, v2}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    .line 140
    .local v0, builder:Landroid/app/AlertDialog$Builder;
    iget-object v2, p0, Lcom/noshufou/android/su/widget/ChangeLog;->context:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    .line 141
    if-eqz p1, :cond_0

    .line 142
    const v2, 0x7f0b00c2

    .line 140
    :goto_0
    invoke-virtual {v3, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    move-result-object v2

    .line 144
    invoke-virtual {v2, v1}, Landroid/app/AlertDialog$Builder;->setView(Landroid/view/View;)Landroid/app/AlertDialog$Builder;

    move-result-object v2

    .line 145
    const/4 v3, 0x1

    invoke-virtual {v2, v3}, Landroid/app/AlertDialog$Builder;->setCancelable(Z)Landroid/app/AlertDialog$Builder;

    move-result-object v2

    .line 147
    iget-object v3, p0, Lcom/noshufou/android/su/widget/ChangeLog;->context:Landroid/content/Context;

    invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    .line 148
    const v4, 0x7f0b0017

    .line 147
    invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    .line 149
    new-instance v4, Lcom/noshufou/android/su/widget/ChangeLog$1;

    invoke-direct {v4, p0}, Lcom/noshufou/android/su/widget/ChangeLog$1;-><init>(Lcom/noshufou/android/su/widget/ChangeLog;)V

    .line 146
    invoke-virtual {v2, v3, v4}, Landroid/app/AlertDialog$Builder;->setPositiveButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    .line 154
    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;

    move-result-object v2

    return-object v2

    .line 143
    :cond_0
    const v2, 0x7f0b00c3

    goto :goto_0
.end method

.method private getLog(Z)Ljava/lang/String;
    .locals 9
    .parameter "full"

    .prologue
    .line 184
    new-instance v6, Ljava/lang/StringBuffer;

    invoke-direct {v6}, Ljava/lang/StringBuffer;-><init>()V

    iput-object v6, p0, Lcom/noshufou/android/su/widget/ChangeLog;->sb:Ljava/lang/StringBuffer;

    .line 186
    :try_start_0
    iget-object v6, p0, Lcom/noshufou/android/su/widget/ChangeLog;->context:Landroid/content/Context;

    invoke-virtual {v6}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v6

    .line 187
    const/high16 v7, 0x7f06

    .line 186
    invoke-virtual {v6, v7}, Landroid/content/res/Resources;->openRawResource(I)Ljava/io/InputStream;

    move-result-object v3

    .line 188
    .local v3, ins:Ljava/io/InputStream;
    new-instance v1, Ljava/io/BufferedReader;

    new-instance v6, Ljava/io/InputStreamReader;

    invoke-direct {v6, v3}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;)V

    invoke-direct {v1, v6}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V

    .line 190
    .local v1, br:Ljava/io/BufferedReader;
    const/4 v4, 0x0

    .line 191
    .local v4, line:Ljava/lang/String;
    const/4 v0, 0x0

    .line 192
    .local v0, advanceToEOVS:Z
    :cond_0
    :goto_0
    invoke-virtual {v1}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;

    move-result-object v4

    if-nez v4, :cond_1

    .line 238
    invoke-direct {p0}, Lcom/noshufou/android/su/widget/ChangeLog;->closeList()V

    .line 239
    invoke-virtual {v1}, Ljava/io/BufferedReader;->close()V
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    .line 244
    .end local v0           #advanceToEOVS:Z
    .end local v1           #br:Ljava/io/BufferedReader;
    .end local v3           #ins:Ljava/io/InputStream;
    .end local v4           #line:Ljava/lang/String;
    :goto_1
    iget-object v6, p0, Lcom/noshufou/android/su/widget/ChangeLog;->sb:Ljava/lang/StringBuffer;

    invoke-virtual {v6}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v6

    return-object v6

    .line 193
    .restart local v0       #advanceToEOVS:Z
    .restart local v1       #br:Ljava/io/BufferedReader;
    .restart local v3       #ins:Ljava/io/InputStream;
    .restart local v4       #line:Ljava/lang/String;
    :cond_1
    :try_start_1
    invoke-virtual {v4}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v4

    .line 194
    const-string v6, "$"

    invoke-virtual {v4, v6}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v6

    if-eqz v6, :cond_3

    .line 196
    invoke-direct {p0}, Lcom/noshufou/android/su/widget/ChangeLog;->closeList()V

    .line 197
    const/4 v6, 0x1

    invoke-virtual {v4, v6}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v6

    invoke-static {v6}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v5

    .line 199
    .local v5, version:I
    if-nez p1, :cond_0

    .line 200
    iget v6, p0, Lcom/noshufou/android/su/widget/ChangeLog;->lastVersion:I

    add-int/lit8 v6, v6, 0x1

    if-ge v5, v6, :cond_2

    .line 201
    const/4 v0, 0x1

    goto :goto_0

    .line 202
    :cond_2
    const/4 v6, -0x1

    if-ne v5, v6, :cond_0

    .line 203
    const/4 v0, 0x0

    goto :goto_0

    .line 205
    .end local v5           #version:I
    :cond_3
    if-nez v0, :cond_0

    .line 206
    const-string v6, "%"

    invoke-virtual {v4, v6}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v6

    if-eqz v6, :cond_4

    .line 208
    invoke-direct {p0}, Lcom/noshufou/android/su/widget/ChangeLog;->closeList()V

    .line 209
    iget-object v6, p0, Lcom/noshufou/android/su/widget/ChangeLog;->sb:Ljava/lang/StringBuffer;

    new-instance v7, Ljava/lang/StringBuilder;

    const-string v8, "<div class=\'title\'>"

    invoke-direct {v7, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 210
    const/4 v8, 0x1

    invoke-virtual {v4, v8}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, "</div>\n"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    .line 209
    invoke-virtual {v6, v7}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;
    :try_end_1
    .catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_0

    .line 240
    .end local v0           #advanceToEOVS:Z
    .end local v1           #br:Ljava/io/BufferedReader;
    .end local v3           #ins:Ljava/io/InputStream;
    .end local v4           #line:Ljava/lang/String;
    :catch_0
    move-exception v2

    .line 241
    .local v2, e:Ljava/io/IOException;
    invoke-virtual {v2}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_1

    .line 211
    .end local v2           #e:Ljava/io/IOException;
    .restart local v0       #advanceToEOVS:Z
    .restart local v1       #br:Ljava/io/BufferedReader;
    .restart local v3       #ins:Ljava/io/InputStream;
    .restart local v4       #line:Ljava/lang/String;
    :cond_4
    :try_start_2
    const-string v6, "_"

    invoke-virtual {v4, v6}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v6

    if-eqz v6, :cond_5

    .line 213
    invoke-direct {p0}, Lcom/noshufou/android/su/widget/ChangeLog;->closeList()V

    .line 214
    iget-object v6, p0, Lcom/noshufou/android/su/widget/ChangeLog;->sb:Ljava/lang/StringBuffer;

    new-instance v7, Ljava/lang/StringBuilder;

    const-string v8, "<div class=\'subtitle\'>"

    invoke-direct {v7, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 215
    const/4 v8, 0x1

    invoke-virtual {v4, v8}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, "</div>\n"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    .line 214
    invoke-virtual {v6, v7}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    goto/16 :goto_0

    .line 216
    :cond_5
    const-string v6, "!"

    invoke-virtual {v4, v6}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v6

    if-eqz v6, :cond_6

    .line 218
    invoke-direct {p0}, Lcom/noshufou/android/su/widget/ChangeLog;->closeList()V

    .line 219
    iget-object v6, p0, Lcom/noshufou/android/su/widget/ChangeLog;->sb:Ljava/lang/StringBuffer;

    new-instance v7, Ljava/lang/StringBuilder;

    const-string v8, "<div class=\'freetext\'>"

    invoke-direct {v7, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 220
    const/4 v8, 0x1

    invoke-virtual {v4, v8}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, "</div>\n"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    .line 219
    invoke-virtual {v6, v7}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    goto/16 :goto_0

    .line 221
    :cond_6
    const-string v6, "#"

    invoke-virtual {v4, v6}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v6

    if-eqz v6, :cond_7

    .line 223
    sget-object v6, Lcom/noshufou/android/su/widget/ChangeLog$Listmode;->ORDERED:Lcom/noshufou/android/su/widget/ChangeLog$Listmode;

    invoke-direct {p0, v6}, Lcom/noshufou/android/su/widget/ChangeLog;->openList(Lcom/noshufou/android/su/widget/ChangeLog$Listmode;)V

    .line 224
    iget-object v6, p0, Lcom/noshufou/android/su/widget/ChangeLog;->sb:Ljava/lang/StringBuffer;

    new-instance v7, Ljava/lang/StringBuilder;

    const-string v8, "<li>"

    invoke-direct {v7, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 225
    const/4 v8, 0x1

    invoke-virtual {v4, v8}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, "</li>\n"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    .line 224
    invoke-virtual {v6, v7}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    goto/16 :goto_0

    .line 226
    :cond_7
    const-string v6, "*"

    invoke-virtual {v4, v6}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v6

    if-eqz v6, :cond_8

    .line 228
    sget-object v6, Lcom/noshufou/android/su/widget/ChangeLog$Listmode;->UNORDERED:Lcom/noshufou/android/su/widget/ChangeLog$Listmode;

    invoke-direct {p0, v6}, Lcom/noshufou/android/su/widget/ChangeLog;->openList(Lcom/noshufou/android/su/widget/ChangeLog$Listmode;)V

    .line 229
    iget-object v6, p0, Lcom/noshufou/android/su/widget/ChangeLog;->sb:Ljava/lang/StringBuffer;

    new-instance v7, Ljava/lang/StringBuilder;

    const-string v8, "<li>"

    invoke-direct {v7, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 230
    const/4 v8, 0x1

    invoke-virtual {v4, v8}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, "</li>\n"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    .line 229
    invoke-virtual {v6, v7}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    goto/16 :goto_0

    .line 233
    :cond_8
    invoke-direct {p0}, Lcom/noshufou/android/su/widget/ChangeLog;->closeList()V

    .line 234
    iget-object v6, p0, Lcom/noshufou/android/su/widget/ChangeLog;->sb:Ljava/lang/StringBuffer;

    new-instance v7, Ljava/lang/StringBuilder;

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v8

    invoke-direct {v7, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v8, "\n"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;
    :try_end_2
    .catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_0

    goto/16 :goto_0
.end method

.method private openList(Lcom/noshufou/android/su/widget/ChangeLog$Listmode;)V
    .locals 2
    .parameter "listMode"

    .prologue
    .line 248
    iget-object v0, p0, Lcom/noshufou/android/su/widget/ChangeLog;->listMode:Lcom/noshufou/android/su/widget/ChangeLog$Listmode;

    if-eq v0, p1, :cond_1

    .line 249
    invoke-direct {p0}, Lcom/noshufou/android/su/widget/ChangeLog;->closeList()V

    .line 250
    sget-object v0, Lcom/noshufou/android/su/widget/ChangeLog$Listmode;->ORDERED:Lcom/noshufou/android/su/widget/ChangeLog$Listmode;

    if-ne p1, v0, :cond_2

    .line 251
    iget-object v0, p0, Lcom/noshufou/android/su/widget/ChangeLog;->sb:Ljava/lang/StringBuffer;

    const-string v1, "<div class=\'list\'><ol>\n"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 255
    :cond_0
    :goto_0
    iput-object p1, p0, Lcom/noshufou/android/su/widget/ChangeLog;->listMode:Lcom/noshufou/android/su/widget/ChangeLog$Listmode;

    .line 257
    :cond_1
    return-void

    .line 252
    :cond_2
    sget-object v0, Lcom/noshufou/android/su/widget/ChangeLog$Listmode;->UNORDERED:Lcom/noshufou/android/su/widget/ChangeLog$Listmode;

    if-ne p1, v0, :cond_0

    .line 253
    iget-object v0, p0, Lcom/noshufou/android/su/widget/ChangeLog;->sb:Ljava/lang/StringBuffer;

    const-string v1, "<div class=\'list\'><ul>\n"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    goto :goto_0
.end method


# virtual methods
.method public firstRun()Z
    .locals 2

    .prologue
    .line 106
    iget v0, p0, Lcom/noshufou/android/su/widget/ChangeLog;->lastVersion:I

    iget v1, p0, Lcom/noshufou/android/su/widget/ChangeLog;->thisVersion:I

    if-ge v0, v1, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public firstRunEver()Z
    .locals 2

    .prologue
    .line 115
    const-string v0, ""

    iget v1, p0, Lcom/noshufou/android/su/widget/ChangeLog;->lastVersion:I

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    return v0
.end method

.method public getFullLog()Ljava/lang/String;
    .locals 1

    .prologue
    .line 169
    const/4 v0, 0x1

    invoke-direct {p0, v0}, Lcom/noshufou/android/su/widget/ChangeLog;->getLog(Z)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getFullLogDialog()Landroid/app/AlertDialog;
    .locals 1

    .prologue
    .line 130
    const/4 v0, 0x1

    invoke-direct {p0, v0}, Lcom/noshufou/android/su/widget/ChangeLog;->getDialog(Z)Landroid/app/AlertDialog;

    move-result-object v0

    return-object v0
.end method

.method public getLastVersion()I
    .locals 1

    .prologue
    .line 82
    iget v0, p0, Lcom/noshufou/android/su/widget/ChangeLog;->lastVersion:I

    return v0
.end method

.method public getLog()Ljava/lang/String;
    .locals 1

    .prologue
    .line 162
    const/4 v0, 0x0

    invoke-direct {p0, v0}, Lcom/noshufou/android/su/widget/ChangeLog;->getLog(Z)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getLogDialog()Landroid/app/AlertDialog;
    .locals 1

    .prologue
    .line 123
    const/4 v0, 0x0

    invoke-direct {p0, v0}, Lcom/noshufou/android/su/widget/ChangeLog;->getDialog(Z)Landroid/app/AlertDialog;

    move-result-object v0

    return-object v0
.end method

.method public getThisVersion()I
    .locals 1

    .prologue
    .line 98
    iget v0, p0, Lcom/noshufou/android/su/widget/ChangeLog;->thisVersion:I

    return v0
.end method

.method setLastVersion(I)V
    .locals 0
    .parameter "lastVersion"

    .prologue
    .line 90
    iput p1, p0, Lcom/noshufou/android/su/widget/ChangeLog;->lastVersion:I

    .line 91
    return-void
.end method
